subroutine load(ie, fij, fab, fia, & 
          iijkl, iijka, iabij, iiabj, iabci, iabcd, icore, &
          escf, nvn, non) 
use mod_iop
use mod_size
use mod_orbit
use mod_ioff 
implicit none
integer, intent(in) :: nvn, non
real*8, intent(inout) :: escf
real*8, intent(inout) :: ie(*)
real*4, intent(inout) :: fia(*), fab(*), fij(*), iijkl(*)
real*4, intent(inout) :: iijka(*), iabij(*)
real*4, intent(inout) :: iiabj(*), iabci(*), iabcd(*), icore(*)
!
integer nsize, iend, iaabb, i, j
integer iaaaa, ibbbb, iabab, ibaba, iabba, ibaab 
integer, external :: idsymsoc, irpdso
real*8, external :: dnrm2
!
open(unit=77, file='energydatar', form='unformatted')
rewind 77
if(ldebug) then 
write(6,*)'begin read energydatar', noa+nva
endif
read(77)(ie(i), i = 1, noa+nva)
read(77) ESCF
close(77)
do i = 1, noa+nva
   ie(i+noa+nva)=ie(i)
enddo
!
call zeroso(fab, nifvv)
call zeroso(fij, nifoo)
call zeroso(fia, nifvo)
!
!======IJKL======
!
iaaaa = 1
ibbbb = iaaaa + idsymsoc(1, popa, popa, 1, popa, popa, 1) 
iabab = ibbbb + idsymsoc(1, popb, popb, 1, popb, popb, 1)
iend  = iabab + idsymsoc(1, popa, popb, 1, popa, popb, 1)
!
!call getallso(iijkl(ioi1(1)), 1, 'IJKLAA__')
!call getallso(iijkl(ioi1(2)), 1, 'IJKLAB__')
!call getallso(iijkl(ioi1(3)), 1, 'IJKLBB__') 
 call getallso(iijkl(ioi1(2)), 1, 'IJKLAB__')
if(ldebug) then 
call printdnrm2('iijkl', iijkl, 1)
endif
!
!======IJKA======
!
!call getallso(iijka(ioi2(1)), 1, 'IJKAAA__')
!call getallso(iijka(ioi2(2)), 1, 'IJKAAB__')
!call getallso(iijka(ioi2(3)), 1, 'IJKABB__')
!call getallso(iijka(ioi2(4)), 1, 'IJKABA__')
 call getallso(iijka(ioi2(2)), 1, 'IJKAAB__')
if(ldebug) then 
call printdnrm2('iijka', iijka, 2)
endif
!
!======IABIJ======
!
!call getallso(iabij(ioi3(1)), 1, 'ABIJAA__')
!call getallso(iabij(ioi3(2)), 1, 'ABIJAB__')
!call getallso(iabij(ioi3(3)), 1, 'ABIJBB__')
 call getallso(iabij(ioi3(2)), 1, 'ABIJAB__')
if(ldebug) then 
call printdnrm2('iabij', iabij, 3)
endif
!
!======IIABJ======
! IIABJ<i,a|b,j> would be sort as (bi,aj)
!
!call getallso(iiabj(ioi4(1)), 1, 'BIAJAAAA') 
!call getallso(iiabj(ioi4(2)), 1, 'BIAJABAB') 
!call getallso(iiabj(ioi4(3)), 1, 'BIAJBBBB')
!call getallso(iiabj(ioi4(4)), 1, 'BIAJBABA')
!call getallso(iiabj(ioi4(5)), 1, 'BIAJAABB')
call getallso(iiabj(ioi4(1)), 1, 'BIAJAAAA') 
call getallso(iiabj(ioi4(2)), 1, 'BIAJABAB') 
call getallso(iiabj(ioi4(5)), 1, 'BIAJAABB')
if(ldebug) then 
call printdnrm2('iiabj', iiabj, 4)
endif
!
!======IABCI======
!
if(ioiabci==0) then 
!call getallso(iabci(ioi5(1)), 1, 'ABCIAA__')
!call getallso(iabci(ioi5(2)), 1, 'ABCIAB__')
!call getallso(iabci(ioi5(3)), 1, 'ABCIBB__')
!call getallso(iabci(ioi5(4)), 1, 'ABCIBA__')
call getallso(iabci(ioi5(2)), 1, 'ABCIAB__')
if(ldebug) then 
call printdnrm2('iabci', iabci, 5)
endif
endif
!
!======IABCD======
!
if(ioiabcd==0) then
!call getallso(iabcd(ioi6(1)), 1, 'ABCDAA__')
!call getallso(iabcd(ioi6(2)), 1, 'ABCDAB__')
!call getallso(iabcd(ioi6(3)), 1, 'ABCDBB__')
!call getuhf(iabcd(ioi6(1)), 1, 'ABCDAB1_')
!call getuhf(iabcd(ioi6(2)), 1, 'ABCDAB2_')
if(ldebug) then 
!call printdnrm2('iabcd', iabcd, 6)
endif
endif
!
return
end 
